<!DOCTYPE HTML>
<head> 
	<link rel="stylesheet" href="/static/table_stylesheet.css">
	<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
    <script type="text/javascript" src="/static/table_script.js"></script>
	<script type="text/javascript" src="/static/table_search.js"></script>
	<script src="./js/pagination.js" type="text/javascript"></script>
	<title>Marketplace</title>
 </head>
 <body>
 	{% if user %}
 	<h1> Hi {{usernick}} ! </h1>
	<a href='/profile'>Edit display name</a>
 	{% else %}
 	<h1> Hi guest! </h1>
 	{% endif %}
 	<div id = "page-wrap">
	<input type="text" id="search" placeholder="Search" />
 	<table border="1" id="browse_table" bordercolor="#FFCC00" style="background-color:#FFFFCC" width="100%" cellpadding="3" cellspacing="0"><thead>
	<tr id="browse_header" class=""><th>Title</th><th>Seller</th><th>Price</th><th>Creation Date</th></tr>
	</thead>

    {% for i in data %}
    <tr><td> <form name="item_detail" action="/item_detail" method="get">
    <input type="text" value= "{{i.Key_Date}}" name="key_name" style="display:none">
    <button type="submit">{{i.Title}} </button> </form>  </td>
    <td> {{i.Creation_Date}} </td>
    <!--
    <td><form name="item_detail" action="/item_detail" method="get">
    <input type="text" value= "{{i.Key_Date}}" name="key_name" style="display:none">
    <button type="submit">Details</button>
</form></td>--></tr> 
	{% endfor %}
</table>
</div>

<br>

